xen: libxc: allow to set the ratelimit value online
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 28 Sep 2016 15:04:30 +0000 (16:04 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Wed, 28 Sep 2016 15:05:01 +0000 (16:05 +0100)
commit96bffd3a91746351eac0b16bbf9f9cba099a13c7
treebf9cd11df65a6690ab5aefaab226fb51d2c04582
parentb4ab702d5c0d4c6d3f2555601fb94060c6427e64
xen: libxc: allow to set the ratelimit value online

The main purpose of the patch is to provide the xen-libxc
plumbing necessary to be able to change the value of the
ratelimit_us parameter online, for Credit2 (like it is
already for Credit1).

While there:
 - mention in the Xen logs when rate limiting was enables
   and is being disabled (and vice-versa);
 - fix csched2_sys_cntl() which was always returning
   -EINVAL in the XEN_SYSCTL_SCHEDOP_putinfo case.

And also:
 - fix style of an if in csched_sys_cntl();
 - fix the style of the switch in csched2_sys_cntl();

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_csched2.c
xen/common/sched_credit.c
xen/common/sched_credit2.c
xen/include/public/sysctl.h